#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'

int main() {
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n, m; cin >> n >> m;
	double x = 0, y = 0;
	while (n--) {
		int a, b; cin >> a >> b;
		if (a == 1) x += b;
		y += b;
	}
	cout << fixed << setprecision(3) << m * x / y << endl;
	return 0;
}